import request from '@/config/axios'


export const GoodsApi = {
  // 更新商品
  updateGoods: async (data: any) => {
    return await request.put({ url: `/shops/goods/update`, data })
  },
  // 创建商品
  createGoods: async (data: any) => {
    return await request.post({ url: `/shops/goods/create`, data })
  },
  // 获取商品分页
  getGoodsPage: async (params: any) => {
    return await request.get({ url: `/shops/goods/page`, params })
  },
  // 删除商品
  deleteGoods: async (params: any) => {
    return await request.delete({ url: `/shops/goods/delete`, params })
  }
}